#入口文件
from flask import Flask
from settings import Config,db #导入配置类和数据库操作对象
#导入蓝图对象
from index_page import index_page
from list_page import list_page
from detail_page import detail_page
from user_page import user_page

app = Flask(__name__)
app.config.from_object(Config) #加载配置类
db.init_app(app) #初始化数据库操作对象

#注册蓝图对象
app.register_blueprint(index_page,url_prefix='/')
app.register_blueprint(list_page,url_prefix='/')
app.register_blueprint(detail_page,url_prefix='/')
app.register_blueprint(user_page,url_prefix='/')

if __name__ == '__main__':
    app.run(debug=True)



